From: Øyvind Kolås Date: Mon, 12 Nov 2018 22:36:51 +0000 (+0100) Subject: docs: update with information about CMYK X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~12^2~51 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0165b5523a15fc0b9514c50aa3157a567675019a;p=babl.git docs: update with information about CMYK --- diff --git a/docs/index-static.html.in b/docs/index-static.html.in index 16ca612..39cbaaa 100644 --- a/docs/index-static.html.in +++ b/docs/index-static.html.in @@ -259,29 +259,43 @@ lab_buffer = malloc (pixel_count * 3 * sizeof (float));

Color Management

-

By default the babl API is assuming data to be (unbounded) sRGB data, data - being sRGB defines the conversion to and from gray-scale as well as the gamma +

All pixel formats in babl have a specified color space, if NULL is passed +as a space constants for (unbounded) linear sRGB data is assumed, data being +sRGB defines the conversion to and from gray-scale as well as the gamma - or Transfer Response Curve, TRC, used for converting between linear and - non-linear variants of the data. -

+ non-linear variants of the data.

babl has API for creating a format for a specific space: - babl_format_with_space("R'G'B' u16", babl_space ("Rec2020")) creates - a 16 bit integer format for the Rec2020 color space. Babl knows internally - about "sRGB", "Rec2020", "Adobe", "Apple" and "ProPhoto" spaces, as they are - defined with constants on their wikipedia pages. -

+babl_format_with_space("R'G'B' u16", babl_space ("Rec2020")) creates a +16 bit integer format for the Rec2020 color space. Babl knows internally about +"sRGB", "Rec2020", "Adobe", "Apple", "ProPhoto", "ACEScg" and "ACES2065-1" +spaces, as they are defined with constants on their wikipedia pages or similar upstream references.

Additional spaces can be loaded from monitor-class matrix+TRC ICC v2 and v4 profiles. Using babl_icc_make_space (see babl.h for details). The space of a babl format can also be queried with babl_format_get_space.

-

The conversions babl does with ICC profiles are according to what is known - as the relative-colorimetric intent, monitor profiles containing both the - matrices used by babl and 3d CLUTs (color look up tables) sometimes also do - relative-colorimetric transfer for the "perceptual" intent CLUTs, but with - a more flexible and possibly higher accuracy conversions.

+ +

CMYK

+ +

CMYK handling is done using babl-spaces created with ICC profiles +containing CMYK profiles. BablSpaces for these ICC profiles handle color conversions using lcms2 - or if compiled without lcms2 support a naive profile independent fallback.

+

When a babl space derived from a CMYK ICC profile is used to instantiate +RGB formats, the resulting formats are using the default/NULL space for +primaries and TRCs.

+ +

The CMYK formats that use lcms2 for color interchange with the rest of +babl are the following, which are available for all data types, u8, u16, half +and float:

+
+
CMYK
Cyan Magenta Yellow Key, with 0 being white and 1.0 full ink coverage.
+
CMYKA
as previous, with non-associated alpha channel
+
CaMaYaKaA
as previous but premultiplied/associated alpha
+
cmyk
inverted CMYK, where 0.0 is full ink coverage and 1.0 is none
+
cmykA
as previous, with non-associated alpha channel
+
camayakaA
as previous but premultiplied/associated alpha
+
@@ -355,6 +369,7 @@ lab_buffer = malloc (pixel_count * 3 * sizeof (float)); --> +

Pre-multiplied alpha